package com.zfzs.post.modules.post.service;

import com.zfzs.post.modules.post.domain.PostTerminalDistribu;
import com.zfzs.post.modules.post.domain.dto.DistribuDTO;
import com.zfzs.post.modules.post.service.dto.PostTerminalDistribuDTO;
import com.zfzs.post.modules.post.service.dto.PostTerminalDistribuQueryCriteria;
//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
* @author wq
* @date 2019-10-09
*/
//@CacheConfig(cacheNames = "postTerminalDistribu")
public interface PostTerminalDistribuService {

    /**
    * queryAll 分页
    * @param criteria
    * @param pageable
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    Object queryAll(PostTerminalDistribuQueryCriteria criteria, Pageable pageable);

    /**
    * queryAll 不分页
    * @param criteria
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    public Object queryAll(PostTerminalDistribuQueryCriteria criteria);

    /**
     * findById
     * @param id
     * @return
     */
    //@Cacheable(key = "#p0")
    PostTerminalDistribu findById(Long id);

    /**
     * create
     * @param resources
     * @return
     */
    //@CacheEvict(allEntries = true)
    PostTerminalDistribu create(PostTerminalDistribu resources);

    /**
     * update
     * @param resources
     */
    //@CacheEvict(allEntries = true)
    void update(PostTerminalDistribu resources);

    /**
     * delete
     * @param id
     */
    //@CacheEvict(allEntries = true)
    void delete(Long id);

    /**
     * 查询sn的分配情况
     * @param snList
     * @return
     */
    List<PostTerminalDistribu> getTerDistribuListBySnList(List<String> snList);

    /**
     * 更新列表
     * @param list
     */
    void updateDisList(List<PostTerminalDistribu> list);

    /**
     * 查询个人的sn
     * @param sn
     * @return
     */
    Long findOwnerBySn(String sn);
}